print("=======set========")
#初始化
myset=set()
myset={1,2,3,4,5,6}
print(myset)
#add
myset.add(7)
myset.add("a")
myset.add("b")
myset.add("c")
print(myset)
#remove
myset.remove(1)
print(myset)
#pop
a=myset.pop()
print(a)
print(myset)
#clear
myset.clear()
print(myset)

#difference 差集
seta={1,2,3}
setb={1,2,4}
setc=seta.difference(setb)
print(setc)

#difference_update
seta.difference_update(setb)
print(seta)
print(setb)

#union
setc=seta.union(setb)
print(setc)

#len
print(len(setc))

#循环
for x in setc:
    print(x," ",end="")

print()






